import http from "@/api/index";

/* 保存应急组 */
export function saveGroup(data:Object): Promise<any> {
  return http.request({
    url: `emergency/config/saveGroup`,
    method: "POST",
    data:data
  });
}

/* 应急组 */
export function getGroupList(data:Object): Promise<any> {
  return http.request({
    url: `emergency/config/getGroupList`,
    method: "POST",
    data:data
  });
}

/* 删除应急组 */
export function deleteGroup(data:Object): Promise<any> {
  return http.request({
    url: `emergency/config/deleteGroup`,
    method: "POST",
    data:data
  });
}


export function saveGroupUser(data:Object): Promise<any> {
  return http.request({
    url: `emergency/config/saveGroupUser`,
    method: "POST",
    data:data
  });
}
export function getUserList(data:Object): Promise<any> {
  return http.request({
    url: `/admin/config/userList`,
    method: "POST",
    data:data
  });
}

export function getGroupUserList(data:Object): Promise<any> {
  return http.request({
    url: `emergency/config/getGroupUserList`,
    method: "POST",
    data:data
  });
}
export function deleteGroupUser(data:Object): Promise<any> {
  return http.request({
    url: `emergency/config/deleteGroupUser`,
    method: "POST",
    data:data
  });
}
export function getGroupUserTasks(data:Object): Promise<any> {
  return http.request({
    url: `emergency/config/getGroupUserTasks`,
    method: "POST",
    data:data
  });
}
export function saveEmergencyCase(data:Object): Promise<any> {
  return http.request({
    url: `emergency/config/saveEmergencyCase`,
    method: "POST",
    data:data
  });
}
export function getEmergencyCaseList(data:Object): Promise<any> {
  return http.request({
    url: `emergency/config/getEmergencyCaseList`,
    method: "POST",
    data:data
  });
}
export function addEmergencyCaseGroup(data:Object): Promise<any> {
  return http.request({
    url: `emergency/config/addEmergencyCaseGroup`,
    method: "POST",
    data:data
  });
}
export function getEmergencyCaseInfo(data:Object): Promise<any> {
  return http.request({
    url: `emergency/config/getEmergencyCaseInfo`,
    method: "POST",
    data:data
  });
}
export function deleteEmergencyCaseGroup(data:Object): Promise<any> {
  return http.request({
    url: `emergency/config/deleteEmergencyCaseGroup`,
    method: "POST",
    data:data
  });
}
export function getEmergencyTaskDetail(data:Object): Promise<any> {
  return http.request({
    url: `emergency/data/getEmergencyTaskDetail`,
    method: "POST",
    data:data
  });
}

export function getEmergencyTask(data:Object): Promise<any> {
  return http.request({
    url: `/emergency/data/getEmergencyTask`,
    method: "POST",
    data:data
  });
}

export function exportEmergencyTask(data:Object): Promise<any> {
  return http.request({
    url: `emergency/data/exportEmergencyTask`,
    method: "POST",
    data:data
  });
}

/* C端 */
export function getUserEmergencyTaskInfo(data:Object): Promise<any> {
  return http.request({
    url: `emergency/data/getUserEmergencyTaskInfo`,
    method: "POST",
    data:data
  });
}
export function doEmergencyTask(data:Object): Promise<any> {
  return http.request({
    url: `emergency/data/doEmergencyTask`,
    method: "POST",
    data:data
  });
}
export function completeUserTask(data:Object): Promise<any> {
  return http.request({
    url: `emergency/data/completeUserTask`,
    method: "POST",
    data:data
  });
}
export function deleteEmergencyCase(data:Object): Promise<any> {
  return http.request({
    url: `emergency/config/deleteEmergencyCase`,
    method: "POST",
    data:data
  });
}
